package com.liuguang.api.redis;

import com.liuguang.common.pojo.CommonResult;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;

/**
 * @ClassName: RedisService
 * @Description： redis
 * @Author: wanghr
 * Date: 12:22 PM 2020/9/13
 * Version: 1.0
 */
public interface RedisService {

    CommonResult set(String key, String value);

    void setWithTime(String key,String value,Long min);

    void setByMap(HashMap<String, String> redisMap);

    CommonResult setHash(String key,Map<String, Object> value, Long time);

    CommonResult<String> get(String key);

    CommonResult deleteBykey(String codeKey);

    CommonResult expire(String key,long timeout,TimeUnit timeUnit);

    CommonResult saveToList(String key,String value);

    CommonResult<List<String>> getList(String failMessageListKey);

    CommonResult deleteListByInteger(String key, Integer integer);
}
